package com.cms.controller.admin;

import com.cms.constant.CommonConstant;
import com.cms.entity.Admin;
import com.cms.entity.Site;
import com.cms.utils.WebUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Controller - 管理员退出
 * 
 * 
 * 
 */
@Controller("adminLogoutController")
@RequestMapping("/admin/logout")
public class LogoutController extends BaseController{

	/**
	 * 退出
	 */
	@RequestMapping
	public String index(){
		WebUtils.getSession().removeAttribute(CommonConstant.SESSION_ADMIN);
		WebUtils.getSession().removeAttribute(CommonConstant.ADMIN_SESSION_SITE);
		return "redirect:/admin/login";
	}
}
